package com.zhts.oa.exception;

public enum EmBusinssError implements CommonError{

    //通用错误类型
    PARAMETER_VALIDATION_ERROR(10001,"参数不合法"),
    UNKNOWN_ERROR(10002,"未知错误"),
    NOTFIND(10003,"查询结果为空"),
    //以20000开头为用户信息相关错误定义
    USER_NOT_EXIST(20001,"用户不存在"),
    USER_Login_Fail(20002,"用户账号或密码不正确"),
    LOGINOUTTIME(30001,"登录状态过期，请重新登录"),
    ERRORTYPETOSEE(401,"状态错误，请登录"),
    NOTEXCEL(10005,"文件类型不为EXCEL"),
    UNAME_EXIST(10006,"用户名已存在"),
    TEL_EXIST(10007,"电话已存在"),
    UPLOAD_Failure(10008,"文件上传失败"),
    EQUIP_EXIST(10009,"设备已存在");

    private int errCode;
    private String errMsg;

    EmBusinssError(int errCode, String errMsg) {
        this.errCode = errCode;
        this.errMsg = errMsg;
    }

    @Override
    public int getErrCode() {
        return this.errCode;
    }

    @Override
    public String getErrMsg() {
        return this.errMsg;
    }

    @Override
    public CommonError setErrMsg(String errMsg) {
        this.errMsg = errMsg;
        return this;
    }
}
